package org.jacoco.cli.internal.commands;

import org.jacoco.cli.internal.Command;

import java.util.Arrays;
import java.util.List;

public final class AllCommands {

    private AllCommands() {
    }

    public static List<Command> get() {
        return Arrays.asList(new Dump(), new Instrument(), new Merge(),
                new Report(), new ClassInfo(), new ExecInfo(), new Version(), new Attach());
    }

    public static String names() {
        final StringBuilder sb = new StringBuilder();
        for (final Command c : get()) {
            if (sb.length() > 0) {
                sb.append('|');
            }
            sb.append(c.name());
        }
        return sb.toString();
    }

}
